<style>
  .picImg {
    width: 40px;
    height: 40px;
  }
</style>
<template>
  <div class="app-container">
    <div class="filter-container">
      <el-input v-model="editForm.serviceID" placeholder="保代公司ID" style="width: 300px"/>
      <el-button @click="getInput">查询</el-button>
    </div>
    <!--&lt;!&ndash; 查询和其他操作 &ndash;&gt;-->
    <el-table v-loading="listLoading" :data="list" element-loading-text="正在查询中。。。" border fit highlight-current-row>

      <el-table-column align="center" min-width="100" label="小权益服务商名称" prop="serviceName"/>
      <el-table-column align="center" min-width="100" label="小权益服务商统一信息用代码" prop="unicode"/>
      <el-table-column align="center" min-width="100" label="保单总数" prop="billCount"/>
      <el-table-column align="center" min-width="100" label="保单总额" prop="billAmount"/>
      <el-table-column align="center" min-width="100" label="服务费用总额" prop="fee"/>
    </el-table>
    <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.pageSize"
                @pagination="getList"/>
  </div>
</template>

<script>
  import {doGet, doPost} from '@/api'
  import {cities} from '@/utils/base'
  import Pagination from '@/components/Pagination' // Secondary package based on el-pagination

  export default {
    name: 'bank',
    components: {Pagination},
    filters: {},
    data() {
      return {
        list: [],
        total: 0,
        listLoading: true,
        listQuery: {
//                    page: 1,
//                    pageSize: 20
          serviceID: ''
        },
        editForm: {
          serviceID: undefined
        },
        editDialogVisible: false,
      }
    },
    created() {
      this.getList()
    },
    methods: {
      getList() {
        this.listLoading = true
        doGet('servicesearch.html?op=list', this.editForm).then(response => {
          this.list = response.rows
          this.total = response.rows.length
          this.listLoading = false
        }).catch(() => {
          this.list = []
          this.total = 0
          this.listLoading = false
        })
      },
      getInput() {
        this.getList()
      }
    }
  }
</script>
